/*
 * @Description: Ts omit一致过滤数据
 * @Autor: lcz
 * @Date: 2022-08-12 16:00:17
 * @LastEditors: lcz
 * @LastEditTime: 2022-08-16 09:39:10
 */

export function omit<T extends object, K extends keyof T>(obj: T, arr: K[]): Omit<T, K> {
    const clone = { ...obj };
    if (Array.isArray(arr)) {
        arr.forEach(i => {
            delete clone[i];
        });
    }
    return clone;
}
